﻿using System;
using System.Net.Http;
using System.Threading.Tasks;

namespace TestConsole
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Starting connections");
            var g = GetAsync();
            g.Wait();
            Console.WriteLine("Connections done");
            Console.ReadKey();
        }
        static async Task GetAsync()
        {
            for (int i = 0; i < 5; i++)
            {
                //using (var client = new HttpClient())
                //{
                //    var result = await client.GetAsync("http://www.taiden.cn/");
                //    Console.WriteLine(result.StatusCode);
                //}
                var client = new HttpClient();
                var result = await client.GetAsync("http://www.taiden.cn/");
                Console.WriteLine(result.StatusCode);
            }
        }
    }
}
